package com.dc.excel.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.dc.excel.model.EnergyModel;

import java.util.ArrayList;
import java.util.List;

public class EnergyExcelListener extends AnalysisEventListener<EnergyModel> {
    private List<EnergyModel> results = new ArrayList<>();
    @Override
    public void invoke(EnergyModel data, AnalysisContext context) {
        results.add(data);
    }
    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
    public List<EnergyModel> getResults(){return results;}
}